<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta name="description" content="长沙市妇幼医院">
    <link rel="stylesheet" type="text/css" href="./css/area/LArea.css" />
    <link rel="stylesheet" type="text/css" href="./css/order/order_normal.css" />
    <link rel="stylesheet" type="text/css" href="./css/mobiscroll.2.13.2.css" />
    <script src="./js/jquery.min.js"></script>
    <script src="./js/mobiscroll.2.13.2.js"></script>
    <script src="./js/area/LAreaData2.js"></script>
    <script src="./js/area/LArea.js"></script>
    <script src="./js/idcard.js"></script>
    <script src="./js/set-customer.js"></script>
    <title>长沙市健康民生项目</title>


    <style>
        .remark {
            font-size: 12px;
            color: #07b8dd;
        }

        .sub-sheet {
            font-size: 12px;
        }
    </style>

    <style>
        body {
            font-family: "Microsoft YaHei UI", "Microsoft YaHei", "ff-tisa-web-pro-1", "ff-tisa-web-pro-2", "Lucida Grande", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "WenQuanYi Micro Hei", sans-serif;
        }

        h1,
        .h1,
        h2,
        .h2,
        h4,
        .h4,
        h4,
        .h4,
        .lead {
            font-family: "Microsoft YaHei UI", "Microsoft YaHei", "ff-tisa-web-pro-1", "ff-tisa-web-pro-2", "Lucida Grande", "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Hiragino Sans GB W3", "WenQuanYi Micro Hei", sans-serif;
        }

        .dw-day {
            font-size: 12px;
        }

        .sub-row {
            height: 30px;
        }

        .serologic-result-div {
            display: flex;
            justify-content: space-around;
            align-items: center;
            height: 50px;
        }

        .serologic-result-item {
            display: flex;
        }

        .serologic-result-item img {
            max-width: 100%;
            height: 17px;
        }

        .serologic-result-item span {
            font-size: 0.8em;
            padding-left: 5px;
        }

        .sel-info img {
            max-width: 100%;
            height: 22px;
            vertical-align: middle;
        }

        .serologic-img {
            width: 87px !important;
            height: 20px !important;
        }

        .sel-note {
            float: right;
            line-height: 46px;
            color: #c9c9c9;
            font-size: 16px;
        }
        .prompt_message_icon {
            float: left;
            padding-top: 11px;
            padding-left: 16px;
            width: 24px;
            height: 24px;
        }
        .prompt_message_s {
            float: left;
            color: #ffffff;
            font-size: 18px;
            padding-left: 0px;
            padding-top: 11px;
            margin: 0;
        }
        .coupon_sel_0{
            background:#e5e5e5;
        }
        .coupon_sel_1{
            background:#ffb9af;
        }
        .coupon_sel_tip{
            font-size:10px;
        }
        .coupon_sel_info{
            width:245px;
            height:60px;
            float:left;
            overflow: auto;
            margin:5px 0 0 0;
            background:rgba(255, 255, 255, 0);
        }
        .coupon_sel_tip{
            font-size:12px;
            height:20px;
            line-height:15px;
        }
        .coupon_sel_name{
            height:30px;
            line-height:24px;
        }
        .coupon_sel_icon{
            display:none;
            height:24px;
            width:24px;
        }
        .coupon_sel_iconbox{
            margin:0 5px 0 0;
            padding:10px 0 0 0;
            float:right;
            width:50px;
            height:60px;
        }
        .coupon_sel_status_0{
            text-align:center;
            font-size: 14px;
            padding:4px 0 0 0;
            height:30px;
            width:50px;
        }
        .coupon_sel_status_1{
            font-size: 14px;
            text-align:center;
            padding:4px 0 0 0;
            height:30px;
            width:50px;
        }
    </style>
    <style>
        /*分页按钮开始*/
        .pagination {
            display: inline-block;
            /*border: 1px solid #CDCDCD;*/
            /*border-radius: 3px;*/
        }
        .pagination a {
            display: block;
            float: left;
            width: 20px;
            height: 20px;
            outline: none;
            border-right: 1px solid #CDCDCD;
            border-left: 1px solid #CDCDCD;
            color: #555555;
            vertical-align: middle;
            text-align: center;
            text-decoration: none;
            font-weight: bold;
            font-size: 16px;
            font-family: Times, 'Times New Roman', Georgia, Palatino; /* ATTN: need a better font stack */
                
        }
        .pagination a:first-child {
            border: none;
            border-radius: 2px 0 0 2px;
        }

        .pagination a:last-child {
            border: none;
            border-radius: 0 2px 2px 0;
        }

        .pagination input {
            float: left;
            margin: 0;
            padding: 0;
            width: 120px;
            height: 20px;
            outline: none;
            border: none;
            vertical-align: middle;
            text-align: center;
        }

        /* gigantic class for demo purposes */

        .gigantic.pagination {
            margin: 10px 0;
        }

        .gigantic.pagination a {
            height: 40px;
            width: 40px;
            font-size: 30px;
            line-height: 30px;
        }

        .gigantic.pagination input {
            width: 120px;
            height: 30px;
            font-size: 14px;
        }
        /*分页按钮结束*/
        .remark {
            font-size: 12px;
            color: #07b8dd;
        }

        .sub-sheet {
            font-size: 12px;
        }
        /*搜索框*/
        div.search {
            padding: 10px 0;
        }
        .searchD1 {
            position: relative;
            width: 200px;
            margin: 5px 0 0 10px;
        }
        div.search {
            background: #dfdfdf;
        }
        div.search input {
            width: 100%;
            height: 30px;
            padding-left: 10px;
            border: 2px solid #7BA7AB;
            border-radius: 5px;
            outline: none;
            background: #F9F0DA;
            color: #9E9C9C;
        }
        div.search button {
            position: absolute;
            top: 0;
            right: -18px;
            width: 50px;
            height: 100%;
            border: none;
            background: #7BA7AB;
            border-radius: 0 5px 5px 0;
            cursor: pointer;
        }
    </style>
    <script src="./js/order/hpv_sheet.js"></script>
    <script type="text/javascript">
        var orderData = '';
        var area2 = new LArea();
        // var BASEURL = 'http://192.168.31.250';
        var BASEURL = '';
        $(document).ready(function () {
            var curr = new Date().getFullYear();
            var currMonth = new Date().getMonth() + 1;
            var opt = {};
            opt.date = { preset: 'date' };
            opt.datetime = { preset: 'datetime' };
            opt.default = {
                theme: 'android-holo light', //皮肤样式
                display: 'modal', //显示方式
                mode: 'scroller', //日期选择模式
                dateFormat: 'yyyy-mm-dd',
                lang: 'zh',
                showNow: false,
                stepMinute: 5,
                startYear: 1920, //开始年份
                endYear: curr + 0 //结束年份
            };
            $('.settings').bind('click', function () {//末次月经

            var demo = 'datetime';
            if (!demo.match(/select/i)) {
                $('.demo-test-' + demo).val('');
            }
            $('.demo-test-' + demo).scroller('destroy').scroller($.extend(opt['date'], opt['default']));

            $('.demo').hide();
            $('.demo-' + demo).show();
            });
            $('#demo').trigger('click');
            $('.settings1').bind('click', function () {//采样日期

            var demo = 'datetime';
            if (!demo.match(/select/i)) {
                $('.demo-test-' + demo).val('');
            }
            $('.demo-test-' + demo).scroller('destroy').scroller($.extend(opt['date'], opt['default']));

            $('.demo1').hide();
            $('.demo-' + demo).show();
            });
            $('#demo1').trigger('click');
            if (orderData) {
                var obj = JSON.parse(orderData);
                $("#lastPeriod").val(obj.lastMenstrualPeriod);
            }
        });

        function areaInit() {
            area2.init({
                'trigger': '#area-opt',
                'valueTo': '#area-value',
                'keys': {
                    id: 'value',
                    name: 'text'
                },
                'type': 2,
                'data': [provs_data, citys_data, dists_data]
            });
        }
        //选择单位
        function selCustomer(obj){
            var id = obj.id;
            var value = $("#"+id).data("value");
            var input_value = $("#"+id).data("input");
            //alert(value);
            if(value.length > 15){
                value = value.substring(0,12) + '...';
            }
            $("#customer-value").text(value);
            $("#customer-value").css('color','#333');
            $("#customer").val(input_value);
            $("#customerName").val(value)
            //关闭浮层
            closeSelTips('customerSelDiv');
        }
        var queryCustomer={};
        //搜索客户
        function searchCustom() {
            var queryStr = $('#searchStr').val();
            doQuery();
        }
        var totalPage=0
        function doQuery() {
            $.ajax({
                type: "post",
                url: BASEURL+"/csfy/intf.do",
                data: {
                    method:'getCustomers',
                    addressCity:'长沙市',
                    productCode:'DX0532'
                },
                dataType: "json",
                success: function (data) {
                    var rows = data.rows;
                    var total = data.total;
                    var info = '0/0';
                    if (total && total != 0) {
                        totalPage = Math.ceil(parseInt(total) / queryCustomer.rows);
                        info = queryCustomer.page + ' / ' + totalPage;
                    }
                    $('#pageInfo').attr('value', info)
                    if (queryCustomer.page < totalPage) {
                        queryCustomer.page = queryCustomer.page + 1;
                    }
                    var cusStr = '';
                    if (rows) {
                        for (var key in rows) {
                            var obj = rows[key];
                            var str = '<li id="customer-' + key + '" data-input="' + obj['customerCode'] + '" data-value="' + obj['customerName'] + '" class="sel-info" onclick="selCustomer(this);">' + obj['customerName'] + '</li><div class="input-line"></div>';
                            cusStr += str;
                        }
                        $('#customerBox').html(cusStr);
                    } else {
                        var str = '<li style="text-align:center;color: #00afee;" id="customer-' + 0 + '" data-input="' + '' + '" data-value="' + '' + '" class="sel-info" onclick="selCustomer(this);">' + '没有数据' + '</li><div class="input-line"></div>';
                        $('#customerBox').html(str);
                    }
                }
            });
        }
        //选择性别
function selGender(obj){
    var id = obj.id;
    var value = $("#"+id).data("value") ;
    var input_value = $("#"+id).data("input");
    //alert(value);
    $("#gender-value").text(value);
    $("#gender-value").css('color','#333');
    $("#gender").val(input_value);
    //关闭浮层
    closeSelTips('genderSelDiv');

}
//选择样本类型
function selsampleType(obj){
    var id = obj.id;
    var value = $("#"+id).data("value") ;
    var input_value = $("#"+id).data("input");
    //alert(value);
    $("#sampleType-value").text(value);
    $("#sampleType-value").css('color','#333');
    $("#sampleType").val(input_value);
    //关闭浮层
    closeSelTips('sampleTypeSelDiv');

}
    </script>
</head>

<body onload="orderSheetOnLoad();">
    <!--送检单信息-->
    <form id="actform" name="actform"  method="post">
        <input class="submit" id="id" name="id" type="hidden" value="1000862" />
        <input id="needOtherReport" name="needOtherReport" type="hidden" value="1" />
        <!--顶部图标-->
        <div class="sheet-title">
            <div style="padding:10px 0 10px 0;font-size:24px;color:#07b8dd;text-align:center;">HPV检测</div>
            <div onclick="useCoupon()" style="margin:0 auto; overflow:hidden;">
                <img id="coupon_icon" class="prompt_message_icon" style="display:block;width:24px;height:24px;" src="./images/order/coupon.png">
                <div id="coupon_title" class="prompt_message_s" style="color: red;margin:0 0 10px 10px;cursor:pointer;">点击使用免费券</div>
            </div>
        </div>

        <!--送检单信息-->
        <div class="sheet-box">
            <input class="submit" id="customer" name="customerCode" type="hidden" value="">
            <input class="submit" id="customerName" name="customerName" type="hidden" value="">
            <div class="sheet-row" onclick="openSelectTip('customerSelDiv')"><span class="input-title"><span style="color: #c00">*</span>送检单位</span>
                <div class="select-right" id="customerSel">
                    <p><span id="customer-value">请选择送检单位</span><span><img class="tips-icon" src="./images/order/select-icon.png" alt="select icon"/></span></p>
                </div>
            </div>
            <div class="input-line"></div>
            <div class="sheet-row"><span class="input-title">科室</span><img id="weight-tips" class="tips-icon" style="height:20px;padding-bottom: 6px; display: none;" src="./images/order/qs-tip-redonly.png" alt="tips icon"/>
                <input class="submit" id="office" name="departments" type="text" style="width: 45%;" placeholder="请输入送检科室" value=""/>
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <span class="input-title">送检医生</span>
                <img id="weight-tips" class="tips-icon" style="height:20px;padding-bottom: 6px; display: none;"
                    src="./images/order/qs-tip-redonly.png" alt="tips icon" />
                <input class="submit" id="doctorName" name="doctorName" type="text" style="width: 45%;" placeholder="请输入送检医生姓名" value="" />
            </div>
            <div class="input-line"></div>
        <input class="submit" id="sampleType" name="sampleType" type="hidden" value="0">
        <div class="sheet-row" onclick="openSelectTip('sampleTypeSelDiv')"><span class="input-title">样本类型</span>
            <div class="select-right" id="sampleTypeSel">
                <p><span id="sampleType-value">请选择</span><span><img class="tips-icon" src="./images/order/select-icon.png" alt="select icon"/></span></p>
            </div>
        </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <div class="date-pick">
                    <span class="input-title"><span style="color: #c00">*</span>采样日期</span><img id="bloodDate-tips" class="tips-icon" style="height:20px;padding-bottom: 6px; display: none;" src="./images/order/qs-tip-redonly.png" alt="tips icon"/>
                    <div class="settings1" style="display:none;">
                        <select name="demo1" id="demo1">
                            <option value="date">日期</option>
                        </select>
                    </div>
                    <input name="bloodDate" id="bloodDate"
                        class="submit demo-test-date demo-test-datetime demo-test-time demo-test-credit"
                        placeholder="请选择采样日期"
                        style="padding-top:4px" onchange="" value=""/>
                </div>
                <span style="float:right" onclick="triggerDate();"><img class="tips-icon date-pick-img" src="./images/order/select-icon.png" alt="select icon"/></span>
            </div>
        </div>
        <!-- 受检者信息 -->
        <div class="sheet-box">
            <div class="input-line"></div>
            <div class="sheet-row">
                <span style="color: #c00">*</span><span class="input-title">姓名</span>
                <input class="submit" id="name" name="sampleName" type="text" placeholder="请输入受检者的名字" value="" />
            </div>
            <div class="input-line"></div>
        <input class="submit" id="gender" name="sampleSex" type="hidden" value="0">
        <div class="sheet-row" onclick="openSelectTip('genderSelDiv')"><span class="input-title"><span style="color: #c00">*</span>性别</span>
            <div class="select-right" id="genderSel">
                <p><span id="gender-value">请选择</span><span><img class="tips-icon" src="./images/order/select-icon.png" alt="select icon"/></span></p>
            </div>
        </div>
        <div class="input-line"></div>
            <div class="sheet-row">
                <span class="input-title">年龄</span>
                <img id="height-tips" class="tips-icon" style="height:20px;padding-bottom: 6px; display: none;"
                    src="./images/order/qs-tip-redonly.png" alt="tips icon" />
                <input class="submit" id="age" name="sampleAge" type="number" style="width: 45%;" onchange="checkAge();" step="1" placeholder="请输入受检者的年龄" value=""
                />
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <span class="input-title">婚否</span>
                <input class="submit" id="marriage" name="isMarried" type="text" style="width: 45%;" placeholder=""
                    value=""/>
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <span style="color: #c00">*</span><span class="input-title">手机号</span>
                <input class="submit" id="phone" name="samplePhoneNum" type="tel" placeholder="请输入受检者的手机号码" onchange="checkMobile('phone')"
                    value="" />
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                    <input class="submit" id="province" name="addressProvince" type="hidden" value="" />
                    <input class="submit" id="city" name="addressCity" type="hidden" value="" />
                    <input class="submit" id="county" name="addressCounty" type="hidden" value="" />
    
                    <div class="date-pick">
                        <span class="input-title">现居住址</span>
                        <input class="submit" id="area-opt" type="text" readonly="readonly" placeholder="请选择现居住址" class="area-input" />
                        <input class="submit" id="area-value" type="hidden" />
                        <script>
                            areaInit();
                        </script>
                    </div>
                    <span style="float:right" onclick="triggerArea();">
                        <img class="tips-icon date-pick-img" src="./images/order/select-icon.png" alt="select icon" />
                    </span>
                </div>
                <div class="input-line"></div>
                <div class="sheet-row" style=" margin-left: 25px;">
                    <input class="submit" id="address" name="addressStreet" type="text" class="address-input" placeholder="请输入详细地址" value="" />
                </div>
                <div class="input-line"></div>
                <div class="sheet-row">
                    <span class="input-title">邮编</span>
                    <input class="submit" id="postid" name="postNum" type="text" style="width: 45%;" placeholder="请输入邮编"
                        value="" />
                </div>
                <div class="input-line"></div>
                <div class="sheet-row">
                    <span class="input-title">门诊/住院号</span>
                    <input class="submit" id="hospitalNum" name="hospitalNum" type="text" style="width: 45%;" placeholder="请输入门诊/住院号码" value="" />
                </div>
            <div class="sheet-row">
                <span class="input-title">身份证</span>
                <input class="submit" id="idnumber" name="idCard" type="text" placeholder="请输入领券时绑定的证件号码" onchange="checkIdNumber('idnumber')"
                    onkeyup="transX(this)" value="" />
            </div>
        </div>

        <!--临床信息-->
        <div class="sheet-box">
            <div class="sheet-row">
                <div class="date-pick">
                    <span class="input-title">末次月经</span>
                    <img id="lastPeriod-tips" class="tips-icon" style="height:20px;padding-bottom: 6px; display: none;"
                        src="./images/order/qs-tip-redonly.png" alt="tips icon" />
                    <div class="settings" style="display:none;">
                        <select name="demo" id="demo">
                            <option value="date">日期</option>
                        </select>
                    </div>
                    <input name="lmp" id="lastPeriod" class="submit demo-test-date demo-test-datetime demo-test-time demo-test-credit" placeholder="请选择末次月经"
                        style="padding-top:4px" value="" />
                </div>
                <span style="float:right" onclick="triggerDate();">
                    <img class="tips-icon date-pick-img" src="./images/order/select-icon.png" alt="select icon" />
                </span>
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <span class="input-title">既往史</span>
                <input id="previousHistory" name="previousHistory" type="text" style="width: 45%;" placeholder="请输入既往史"
                    value="" />
            </div>
            <div class="input-line"></div>
            <div class="sheet-row">
                <span class="input-title">临床诊断</span>
                <input id="clinicalDiagnosis" name="clinicalDiagnosis" type="text" style="width: 45%;" placeholder="请输入临床诊断" value=""/>
            </div>
        </div>
    </form>

    <div id="ban_bt">
        <button id="bindbtn" onclick="checkForm();">提交</button>
    </div>
    <br/>

    <!-- 遮罩层 -->
    <div id="fade" class="black_overlay"></div>
    <!--================================================== -->
    <div id="sampleTypeSelDiv" class="select_content">
        <ul class="select-ul">
            <li class="sel-title">请选择样本类型</li>
            <li id="sampleType-0" data-input="0" data-value="华大保存液" class="sel-info" onclick="selsampleType(this, 'sampleTypeSelDiv');">
                华大保存液
            </li>
            <div class="input-line"></div>
            <li id="sampleType-1" data-input="1" data-value="FTA卡" class="sel-info" onclick="selsampleType(this, 'sampleTypeSelDiv');">
                FTA卡
            </li>
        </ul>
    </div>
    <div id="genderSelDiv" class="select_content">
        <ul class="select-ul">
            <li class="sel-title">请选择性别</li>
            <li id="gender-0" data-input="1" data-value="男" class="sel-info" onclick="selGender(this);">
                男
            </li>
            <div class="input-line"></div>
            <li id="gender-1" data-input="2" data-value="女" class="sel-info" onclick="selGender(this);">
                女
            </li>
        </ul>
    </div>
    <!-- 选择优惠券 -->
    <div id="couponSelDiv" class="select_content" style="height:100%;background: #ffffff">
        <div class="search">
            <div>
                <div style="height:40px;text-align:center;font-size:24px;padding:20px 0 0 0;margin:10px 0 10px 0;">已领取的免费券</div>
            </div>
            <a type="button" onclick="closeSelTips('couponSelDiv');" style="color:#07b8dd; position:absolute;right:10px;top:35px; height: 25px;">返回</a>
        </div>
        <div class="input-line" style="width: 100%;"></div>
        <div style="height: 80%; overflow:hidden; background: #ffffff">
            <ul id="couponBox" class="select-ul" style="overflow:auto; height: 100%; -webkit-overflow-scrolling : touch;">
                <li style="text-align:center;margin-left:auto;margin-right:auto;color: #00afee;" id="customer-0" data-input="" data-value="" class="sel-info" onclick="selCoupon(this);">
                    <span >您还没有免费券,您可以在公众号点击菜单我的服务-->领取免费券</span>
                </li>
            </ul>
        </div>
     </div>
     <div id="customerSelDiv" class="select_content" style="height:100%;background: #dfdfdf">
        <div class="search" style="width:100%;">
            <div class="searchD1">
                <!-- <input id="searchStr" type="text" placeholder="请输入医院关键字...">
                <button type="submit" onclick="searchCustom();">搜索</button> -->
            </div>
            <div style="text-align:center;font-size:30px;">请选择医院</div>
            <a type="button" onclick="closeSelTips('customerSelDiv');" style="color:#07b8dd; position:absolute;right:10px;top:25px; height: 25px;">取消</a>
        </div>
        <div class="input-line" style="width: 100%;"></div>
        <div style="height: 90%; overflow:hidden; background: #ffffff">
            <div style="height:50px;line-height:50px;display:flex;flex-direction:row;padding-left:15px">
                <span>选择区县：</span>
                <select value="" class="addressCounty" onchange="onAddressCountyChange(this.value)" style="margin-left: 10px; flex: 1; outline: none;font-size: 15px; color: #f00;"></select>
            </div>
            <div class="input-line"></div>
            <ul id="customerBox" class="select-ul" style="overflow:auto; height: 100%; -webkit-overflow-scrolling : touch;">
                <li style="text-align:center;margin-left:auto;margin-right:auto;color: #00afee;" id="customer-0" data-input="" data-value="" class="sel-info" onclick="selCustomer(this);">
                    <span >没有数据</span>
                </li>
    
            </ul>
        </div>
    </div>
    <!-- 提示框 -->
    <div id="tipDia" class="tips">
        <p id="tipmsg" class="tips-msg"></p>
        <div class="tips-line"></div>
        <p class="tips-close" onclick="closeTips();">知道了</p>
    </div>
</body>

</html>